function gotoTuijian(){
}

//根据不同按钮返回图片与textA,textB，动态修改数据
function gotoJingdian(e){
  wx.request({
    url: 'http://localhost:8080',
    dataType:JSON,
    success:function(res){
      console.log(res);
      console.log(e);
    }
  })
}

function gotoMeishi(){
  wx.navigateTo({
    url: '/pages/rim_meishi/rim_meishi',
  })
}

// function gotoJiudian(){
//   wx.navigateTo({
//     url: '/pages/rim_jiudian/rim_jiudian',
//   })
// }

const formatNumber = n => {
  n = n.toString()
  return n[1] ? n : `0${n}`
}

const formatDate = date => {
  const year = date.getFullYear()
  const month = date.getMonth() + 1
  const day = date.getDate()

  return `${[year, month, day].map(formatNumber).join('/')}`
}


module.exports = {
    gotoJingdian,
    // gotoJiudian,
    gotoMeishi,
    gotoTuijian,
    formatDate
  }